<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/mobile/import/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>商品详情</title>
	<%@ include file="/WEB-INF/views/mobile/import/meta.jsp"%>
	<script type="text/javascript">
	var clientCookie = new MallCookieService();
	var sid="${merchant.id}";
	var classifyId = "${classifyId}";
	var choiceClassifyId = "${classifyId}";
	var products = new Array();
	
	$(document).ready(function() {
		//初始化cookie内容
		clientCookie.setSID(sid);
		clientCookie.setClassifyId(classifyId);
		clientCookie.setChoiceClassifyId(choiceClassifyId);
		
		/*初始化内容商品*/
		var item = new Product();
		item.setId("${product.id}");
		item.setPrice("${product.price}");
		item.setStartSaleNum("${product.startSaleNum}"); //起购量
		item.setPurchaseNum("${product.purchaseNum}");   //限购量
		item.setNumber("${product.number}");   //购物车里对应该商品购买数量
		item.setAmount("${product.amount}");   //购物车里对应该商品购买金额
		item.setName("${product.name}");
   		item.setAssisTitle("${product.assisTitle}");
   		item.setLogoUrl("${product.logoUrl}");
   		item.setOriginalPrice("${product.originalPrice}");
		products.push(item);
		
		/**初始化购物车列表*/
		initProductCar();
		
	});
	</script>
</head>
<body>
<!--导航条-->
<%@ include file="/WEB-INF/views/mobile/import/top.jsp"%>
<!-- 内容 -->
<div class="container" style="margin-top: 40px;">
		<div class="col-md-12 col-sm-12 col-xs-12">
			<%@ include file="/WEB-INF/views/mobile/import/navicat.jsp"%>
			
               <div class="row content-main" style="padding-top: 20px;">
                   <div class="col-md-12 col-sm-12 col-xs-12">
					<!--商品信息-->
		           <div class="thumbnail" style="border: 0px">
		               <img id="photo0" class="displayImages media-object body_product_img pc_img" data-src="holder.js/100%x200" alt="100%x200" src="${ctxFront}/images/loading.png" path="${ctxWeb}/shops/download?filePath=${product.logoUrl }" data-holder-rendered="true" style="width: 150px; height: 150px;">
		               <div class="caption text-center">
		                   <h3 id="thumbnail-label"><strong>${product.name }</strong></h3>
		                   <h4 id="thumbnail-label">${product.assisTitle }</h4>
		                   <p> ${product.stock }${product.productUnit.name }</p>
		                   <p><strong class="pc_amount">￥${product.price }</strong> / ${product.productUnit.name }</p>
		               </div>
		           </div>
		           <hr>
		           <!--商品描述-->
		           <h4 style="margin-left: 15px;">
		               <strong class="pc_amount">购买须知</strong>
		           </h4>
		           &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;${product.shouldKnow }
		           <hr>
		           <h4 style="margin-left: 15px;">
		               <strong class="pc_amount">商品介绍</strong>
		           </h4>
		           &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;${product.remarks }
		           <hr>
		           <hr>
		           <hr>
				</div>
               </div>
		</div>
  </div>
  
  <!-- 底部 -->
<nav class="container navbar navbar-default navbar-fixed-bottom pc_bottom_width">
	<div class="container-fluid text-center">
              <div class="row">
                  <div class="col-md-5 col-sm-5 col-xs-5" style="margin-top: 10px; margin-left: 32px;">
                      <div class="input-group input-group-lg">
                   		<img onclick="mall_diffProductCart('${product.id}')" id="imgdiff${product.id}" class="pc_left pc_cursor" status="0" alt="" src="${ctxStatic}/modules/bootstrap/img/diff-2.png" width="30" height="30" align="middle" />
       					<label class="pc_lable pc_left"><strong id="sl_product${product.id}">0</strong></label>
       					<img onclick="mall_addProductCart('${product.id}')" id="imgadd${product.id}" class="pc_left pc_cursor" status="1" alt="" src="${ctxStatic}/modules/bootstrap/img/add-2.png" width="30" height="30" align="middle" />
                      </div>
                  </div>
         		<a href="${ctxShop}/shoping/shopCart?sid=${sid}&classifyId=${classifyId}&mode=${mode}">
		           	<div class="pc_b">
		           		<img alt="去结算" src="${ctxStatic}/modules/bootstrap/img/gwc_0.png" width="50" height="50">
		           	</div>
		               <div class="pc_badger_css" onclick="showShoppingCart()">
		               	<div class="pc_badger_badge" style="border-radius:50%;background-color: red;" id="car_num">0</div>
		               </div>
		          	</a>
          </div>
</nav>
</body>
</html>
